<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/denglu.css">
    <title>Document</title>
</head>
<body>
    
    <div class="header-box">
        <div class="container">
            <a class="logo" href="/"></a>
        </div>
       
    </div>
    <div class="login-main" href="javascript:void(0);">
        <div style="background: url(https://images.wincheers.net/UpLoad/Web/ProductImg/2018-06-01/NEW_XM/登陆.jpg) no-repeat center;height:100%;">
            <a style="display:block; height:100%;" href="https://store.logitech.com.cn/product/pointindex/" target="_blank"></a>
        </div>
        

    <div class="login-box">
        <h4 class="login-title"><span class="name">账户登录</span> </h4>
        <div id="LoginFrom" class="login-form">
            <div class="form-list">
                <input class="input-text"  id="username" >
                <i class="icon-login-user">账号</i>
                <i class="icon-close"></i>
            </div>
            <div class="form-list">
                <input class="input-text" id="password" >
                <i class="icon-login-password">密码</i>
                <i class="icon-close"></i>
            </div>
        </div>
        <div class="d">
            <p class="login-tool">
                <label class="label-check"><input type="checkbox">自动登录</label>
                <a class="link-a" href="/Customer/RetrievePassword">忘记密码</a>
            </p>
            <button id="btn" class="user-default-btn" href="javascript:void(0);">登     录</button>
           
        </div>
    </div>

    </div>
    <div class="footer-box">
        <div class="container">
            <p>罗技官方商城由罗技（中国）科技有限公司授权双齐国际贸易（上海）有限公司负责经营 2021 , all rights reserved</p>
            <p>
                <a >罗技官方网站</a>
                <a >联系方式</a>
                <a >隐私声明</a>
                <a >用户服务协议</a>
                
                <a >沪ICP备12002604号-1</a>
            </p>
        </div>
    </div>


    <!-- js -->
    <script src="./javascripts/jQuery.js"></script>
    <script>
        $(function(){
            $("#btn").click(function(){
                $.ajax({
                    url:"http://localhost/xiangmu/login.php",
                    data:{
                        username:$("#username").val(),
                        password:$("#password").val()
                    },
                    dataType:"json"
                })
                .done(function(res){
                   if(res.type === "登陆成功"){
                        $(location).attr("href","http://localhost:3000/shouye.html")
                   }else{
                       alert("登录失败")
                   }
                });
            });
        })
    </script>
</body>
</html>